package reflection;

import org.junit.Test;

/**
 * @author 吴阳基
 * @datetime 2024/1/3 14:15
 */
public class ShiLi6 {
    @Test
    public void test() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
        Class<?> clz = Class.forName("reflection.Person");//加载Person类
        Object obj = clz.newInstance();//调用Person类的无参构造创建Person类实例
        System.out.println(obj);
    }
}
